<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:c="livcos.org/ns/cosmos"
  xmlns:da="livcos.org/ns/cosmos/data-access"
  xmlns="http://www.w3.org/1999/xhtml"
  exclude-result-prefixes="c da">

  <xsl:import href="../../style/base.xsl" />
  <xsl:import href="../../style/web.xsl" />
  
  <xsl:template match="/">
    <html id="{$callerObjId}">
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>New Project Wizard</title>
        <link href="../../css/global.css" rel="stylesheet" type="text/css" />
      	<script type="text/javascript" src="../../script/util.js"><!-- --></script>
      	<script type="text/javascript" src="../../script/E.js"><!-- --></script>
				<script type="text/javascript">
      		<xsl:comment>
      			
      		function cn(input) {
      			if (!input.value.match("^[A-Za-z][A-Za-z0-9\._-]*$")) {
	      			input.style.color = "red";
	      			input.parentNode.previousSibling.style.color = "red";
      			}
      			else {
      				input.style.color = "black";
      				input.parentNode.previousSibling.style.color = "black";
      				}
      		}
      		
      		</xsl:comment>
				</script>
      	<style>
      		p {
      		font-size: 80%;
      		margin: 6px 20px 10px;
      		}
      		td {
      		border-top: solid 1px gray;
      		height: 5em;
      		padding: 6px;
      		}
      		table {
      		margin: 10px 2px 0px;
      		}
      		.description {
      		font-size: 60%;
      		}
      	</style>
      </head>
      <body>
      	<h2>New Project Wizard</h2>
      	<p>
      		This wizard created the minimal necessary objects for a new project. The "web" view
      		and it's styles (CSS) are shared with the domain chosen.<br/>
      		A non-existing domain will be created with the "web" view, including styles,
      		shared with the "livcos.org" domain.
      	</p>
      	<p>
      		A project object node is owned by a domain. Beside the "data" root it can hold multiple
      		views. The outline within the project can be project specific.
      	</p>
      	<form action="create.view" method="GET">
        	<table cellspacing="0">
            <tbody>
            	<tr>
            		<td>Domain:</td>
								<td>
									<input name="domain" type="text" value="--domain.tld--"
										onkeyup="cn(this)" onchange="cn(this)"/>
								</td>
            		<td class="description">
              		The name of a new or existing domain within the Cosmos data object outline.
              		It is recommended to use an Internet DNS name with the minimum of a 
              		second and a top level domain name.
              		Examples are "livcos.org", "google.com", "departement.company.com",...
              	</td>
              </tr>
              <tr>
              	<td>Name:</td>
              	<td>
									<input name="name" type="text" value="--NewProject--"
										onkeyup="cn(this)" onchange="cn(this)"/>
								</td>
              	<td class="description">
              		The name of the new project. If the name exists already, an exception
              		will be thrown. Project names must also differ from view names (data, web,...)
              		A valid project name starts with a letter and
              		contains only letters, numbers, '.', '_' or '-' characters.
              		Examples are "MyProject", "NextProject",...
              	</td>
              </tr>
            	<tr>
            		<td>Title:</td>
            		<td><input name="title" type="text" value="-- New Project Title --"/></td>
            		<td class="description">
              		The representative title of the project. You can change it later.
              		Examples are "My Project", "Next Project",...
              	</td>
              </tr>
              <tr>
              	<td>&#160;</td>
                <td><input value="Create" type="submit"/></td>
              	<td>&#160;</td>
              </tr>
            </tbody>
          </table>
        </form>
      </body>
    </html>
  </xsl:template>

</xsl:stylesheet>
